classdef ziHF2 < EquipmentControl.ZI.ZurichInstruments
    %ZIHF2 Summary of this class goes here
    %   Detailed explanation goes here
    
    properties

    end
    
    methods
        function obj = ziHF2(dev, varargin)
            %ZIHF2 Construct an instance of this class
            %   Detailed explanation goes here
            p=inputParser;
            levelCheck = @(x) isnumeric(x) && ismember(x, 1:6);
            p.addRequired('dev');
            p.addParameter('level', 6, levelCheck);
            p.addParameter('multiDeviceSync', false, @islogical);
            p.parse(dev, varargin{:});
            obj@EquipmentControl.ZI.ZurichInstruments(dev, p.Results.level);            
        end
        
        function obj = enableSigOutAdd(obj, ch)
            ziDAQ('setInt', ['/' obj.device '/sigouts/' ch '/add'], 1);
        end
        function obj = disableSigOutAdd(obj, ch)
            ziDAQ('setInt', ['/' obj.device '/sigouts/' ch '/add'], 0);
        end
        
        %% Modules
        function spectrum = spectrumModule(obj, session)
            spectrum = EquipmentControl.ZI.ziSpectrum(obj.device);
            spectrum.session = session;
            spectrum.monitor_hdl = session.monitor_hdl;
        end
        function plotter = plotterModule(obj, session)
            plotter = EquipmentControl.ZI.ziPlotter(obj.device, session);
%             plotter.session = session;
            plotter.monitor_hdl = session.monitor_hdl;
        end
    end
end

